Skip to content

New docs#1413

Merged
quietbits merged 40 commits into
modernizationfrom
new-docs
Jun 4, 2026
Merged

New docs#1413
quietbits merged 40 commits into
modernizationfrom
new-docs

Conversation

@quietbits

@quietbits quietbits commented May 8, 2026

Copy link
Copy Markdown
Contributor

Important

Apache-specific affordances — The Link response headers (RFC 8288) and Accept-based markdown content negotiation are implemented in public/.htaccess using mod_rewrite and mod_headers. They only take effect on Apache hosts. On GitHub Pages, Cloudflare Pages, Netlify, and any other host that doesn't honor .htaccess, those features silently degrade to the URL-.md convention only (no errors, just no Link header and no content negotiation). If we move the docs to a non-Apache host, the same behaviors need to be re-expressed in that host's native format (_headers file, edge function, etc.).

Note

Deploy target is stellar.github.io/js-stellar-sdkconfig/site.ts is the single source of truth: SITE_URL = "https://stellar.github.io", BASE_PATH = "/js-stellar-sdk". All generated artifacts (docs/llms.txt, docs/llms-full.txt, public/robots.txt, public/.htaccess, and the Astro sitemap) reference those values. To retarget to a different host or sub-path, edit config/site.ts and run pnpm docs.

Warning

No auto-deploy workflowdocs_build.yml builds and diff-checks the docs on every PR but does not push to any host. Whoever owns docs publishing needs to wire up a follow-up workflow (or update an existing one) that uploads dist/site/ after a master push. Deferred from this PR by design.

Note

Generated artifacts are gitignoredpublic/robots.txt, public/llms.txt, public/llms-full.txt, and public/.htaccess are produced on every build and not committed. Reviewers should run pnpm docs locally to inspect the deployed output; the source-tree diff alone does not show them.

Summary

  • New Astro/Starlight docs site replacing the legacy JSDoc pipeline: Adds astro.config.mjs, docs/ content collection, src/content.config.ts, and a Starlight PageTitle component override (suppresses a duplicate H1 from frontmatter; preserves the SkipLink target). Retires the old website/ scripts and bundle-publish workflow.

  • TypeDoc-driven reference generator (build-docs.ts): Parses every exported SDK symbol via TypeDoc, buckets them by source-file path into named groups ("Core / Keys", "Network / Horizon", "SEPs / WebAuth", etc.), and renders one markdown page per bucket with title + description frontmatter. Source links pin to an evergreen ref so generated pages don't churn on every commit.

  • Source-wide TSDoc migration: Every module (horizon, rpc, webauth, base, stellartoml, contract, utils, index) had its JSDoc-flavored comments converted to TSDoc. Removed @constant, @default, @memberof, @class, @enum, @typedef, @hideconstructor, @static; converted @param {Type} name desc to @param name - desc (types come from signatures); replaced @throws {Error} with @throws; wrapped @example snippets in fenced code blocks. Comment-only changes — no runtime behavior change.

  • Single-source-of-truth deploy config (config/site.ts): Centralizes SITE_URL, BASE_PATH, SITE_BASE_URL, AI_POLICY (Cloudflare Content Signals), and ALLOWED_AI_BOTS. Consumed by astro.config.mjs, build-robots.ts, and build-htaccess.ts so a single edit retargets the entire site to a new host or base path.

  • LLMs bundles + README→index sync (build-llms.ts): Emits docs/llms.txt (compact routing-map index) and docs/llms-full.txt (full corpus + appended CHANGELOG.md) with bundle-relative URLs so the bundles resolve correctly on any host or sub-path. Also syncs README.mddocs/index.md (frontmatter prepended, title derived from README's H1) so the GitHub README and the docs homepage are one source.

  • Agent-readiness server config (build-robots.ts + build-htaccess.ts): Generates a robots.txt carrying explicit per-bot Allow rules for major AI crawlers and Cloudflare Content Signals (search, ai-input, ai-train). Generates an Apache .htaccess advertising the LLMs bundles via RFC 8288 Link response headers and implementing Accept-based markdown content negotiation. Files inert on hosts that don't honor .htaccess.

  • Raw markdown siblings (build-md-siblings.ts): Copies every docs page to a URL.md sibling in the build output so agents can fetch the raw markdown by appending .md to any rendered URL. Rewrites relative non-.md link targets (drops one leading ../) so internal links resolve correctly in both the HTML and raw-.md URL spaces, regardless of deployment base path.

  • agents.md page + sidebar entry: New "AI Agents" docs page describing all three agent-facing surfaces (bundles, raw markdown, crawler policy) and explicitly listing the agent-readiness conventions deliberately not implemented for a JS SDK doc site (RFC 9727 API catalog, MCP server card, OAuth discovery, A2A agent card, commerce protocols).

  • Docs build CI (docs_build.yml): New PR-time workflow chaining docs:reference → docs:llms → docs:robots → docs:htaccess → docs:site and diff-checking docs/ for drift between generated and committed content. CONTRIBUTING refreshed to point at the new docs guide.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX May 8, 2026
@quietbits quietbits marked this pull request as draft May 8, 2026 19:02
@socket-security

socket-security Bot commented May 8, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@quietbits quietbits linked an issue May 8, 2026 that may be closed by this pull request
3 tasks
@socket-security

socket-security Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedplaywright@​1.58.2 ⏵ 1.60.0100 +11001009980 -19

View full report

@quietbits quietbits changed the title [DRAFT] New docs New docs Jun 2, 2026
@quietbits quietbits marked this pull request as ready for review June 2, 2026 19:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f327fc3b7e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/docs_deploy.yml.disabled
Comment thread scripts/build-docs.ts Outdated
@quietbits quietbits requested review from Ryang-21 and oceans404 June 2, 2026 19:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d70c376bc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/docs-source-ref.ts
@Ryang-21

Ryang-21 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Why older majors aren’t network-compatible
The Stellar network upgrades its protocol periodically. Once an upgrade ships, transactions built with an SDK major that targets an older protocol may use deprecated XDR shapes or fail validation. A keypair or strkey doesn’t depend on the protocol version, so basic key manipulation remains usable across majors — but anything that constructs, signs, or submits a transaction is protocol-bound.

Always use the SDK major that matches the protocol of the network you’re targeting (mainnet, testnet, or futurenet — each may run a different protocol during a rollout window).

`
This section is a tad misleading. So submitting transaction with old xdr definitons is not the problem the xdr changes are almost always backwards compatible. The issue that we run into is when reading data. If rpc or horizon data contains a new xdr type that the sdk does not know, its throws an error.

@Ryang-21 Ryang-21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work these docs are much better than what we had previously

@quietbits

Copy link
Copy Markdown
Contributor Author

Why older majors aren’t network-compatible
The Stellar network upgrades its protocol periodically. Once an upgrade ships, transactions built with an SDK major that targets an older protocol may use deprecated XDR shapes or fail validation. A keypair or strkey doesn’t depend on the protocol version, so basic key manipulation remains usable across majors — but anything that constructs, signs, or submits a transaction is protocol-bound.
Always use the SDK major that matches the protocol of the network you’re targeting (mainnet, testnet, or futurenet — each may run a different protocol during a rollout window).

` This section is a tad misleading. So submitting transaction with old xdr definitons is not the problem the xdr changes are almost always backwards compatible. The issue that we run into is when reading data. If rpc or horizon data contains a new xdr type that the sdk does not know, its throws an error.

Thanks for pointing that out, @Ryang-21 . This page might go away if we decide to stick with the current versioning, though.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c49dd12455

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/starlightComponents/Head.astro

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 700e55bd7a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/reference/core-transactions.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab91814e57

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/index.md Outdated
Comment thread docs/index.md Outdated
@quietbits quietbits merged commit fbd3e12 into modernization Jun 4, 2026
7 checks passed
@quietbits quietbits deleted the new-docs branch June 4, 2026 12:57
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Jun 4, 2026
@Ryang-21 Ryang-21 mentioned this pull request Jun 5, 2026
Ryang-21 added a commit that referenced this pull request Jun 5, 2026
* [Modernization] Make fetch default (#1394)

* Replace __USE_AXIOS__ dynamic require with static fetch default

* Add babel and webpack aliasing to emit axios variant from shared source

* Flip package.json exports: fetch default, /axios opt-in, drop /no-axios

* Update eventsource and remove no-eventsource build (#1395)

* update eventsource to v4.1.0 and remove conditional import of eventsource

* remove the dom-monkeypatch as its now included in the tsconfig lib field

* build and export cjs and esm build varients, remove export of umd bundles

* Base Migration (#1399)

* move stellar-base src under src/base

* migrate from classic yarn to pnpm (#1400)

* remove randomBytes for universal crypto.getRandomValues

* replace sha.js with noble/hashes and update to version 2.2.0

* update BigNumber to v11.0.0

* replace noble/curves with noble/ed25519 for reduced bundle size

* replace toml with smol-toml

* replace URI for native URL (#1402)

* refactor: replace URI usage for native URL + URLSearchParam objects

* allow expandUriTemplate to handle relative templated links

* Tooling modernization: Node 22, husky v9, pnpm minimumReleaseAge, drop nyc (#1408)

* Update husky config + remove nyc

* Root .nvmrc + bump Node to v22

* pnpm minimumReleaseAge config

* Use pnpm workspace (#1417)

* New docs (#1413)

* TypeDoc setup

* P27 updates (#1429)

* Update XDR base URLs and improve Makefile for TypeScript definitions

* pull and regenerate xdr definitions for p27

* handle signing the new SorobanCredential varients

* add CAP-71 delegate-credential signing helpers

  - buildAuthorizationEntryPreimage: expose the signature payload (authorizeEntry
    now builds its preimage through it)
  - buildWithDelegatesEntry: wrap ADDRESS/ADDRESS_V2 into ADDRESS_WITH_DELEGATES,
    sorting + de-duping delegates; top-level signature defaults to Void
  - authorizeEntry: optional forAddress to fill a specific node (top-level or a
    delegate) instead of always the top-level
  - export the new helpers + DelegateSignature/BuildWithDelegatesParams from base

* Update readme + pre-push check for docs (#1430)

* Pre-push hook + updated docs

* Update pre-push hook

* Add @stellar/stellar-base migration guide to the installation docs

* Map xdr.HashIdPreimage in typedoc to fix docs:reference build

---------

Co-authored-by: oceans404 <so.orpilla@gmail.com>

* Tx builder type regression (#1438)

* Implement TransactionSource interface for Account and MuxedAccount classes; update TransactionBuilder to use TransactionSource

* TSDoc: Replace @internal with @ignore tag (#1436)

* TSDoc: Replace @internal with @ignore tag

* Add friendbot call builder items

* Dependency updates (#1433)

* Minor: axios + bignumber.js

* Patch: vitest + @vitest

* Minor astro + patch @astro

* Minor: esbuild to v0.27.7 (not latest v0.28.0)

* Some patch + minor

* Major: @rollup/plugin-commonjs

* Major: cross-env + dotenv

* Major: jsdom

* Updated pnpm-lock

* Auth flag namespace (#1441)

* add back AuthFlag namespace

* fix: update build types script for axios to ensure generated types are copied correctly

* P27 guide (#1440)

* add p27 guide

* docs: add task-oriented guides (connect-and-fund, send-a-payment) + internal-link tooling (#1434)

* docs: add internal-link tooling (base-prefix rewriting + dead-link validation)

* docs: add connect-and-fund and send-a-payment guides

* docs: add issue-an-asset guide

* docs: refine issue-an-asset guide (token framing, typed helper, review fixes)

* docs: add query-and-stream guide

* docs: add handle-errors guide

* docs: link guides 02-04 to the handle-errors guide

Add error-handling pointers now that guide 05 exists (sibling-link upgrade):
a primary pointer in guide 02's submit section and lighter pointers in 03/04.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add invoke-a-contract guide (06)

Teaches invoking a deployed Soroban contract from JS with contract.Client and
AssembledTransaction: connect over RPC, preview a call by simulation, then sign
and send a state change. Uses the increment contract; deployment is linked out
to the Stellar CLI tutorial. Regenerate llms bundles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add contract-auth guide (07)

Covers signing Soroban contract authorization for an account other than the
transaction source, framed for AddressV2 (CAP-0071-02) readiness: the same code
is correct on the legacy ADDRESS credential today and on AddressV2 after the
Protocol 28 flip. Distinguishes envelope signing from authorization-entry
signing, and gives a before/after migration for hand-rolled signers
(buildAuthorizationEntryPreimage / authorizeEntry).

Also upgrades the Invoke a Contract guide's closing link to point at this guide,
replaces numbered guide references with named links, and regenerates the llms
bundles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: fold versioning into the home page, drop it as a guide

Versioning and compatibility is reference material, not a task how-to, so it
moves out of the guides nav into a 'Versioning and compatibility' section on the
home page (README -> index). Repoints the agents.md reference to the new
home-page anchor and regenerates index.md + llms bundles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add migration guide (00)

A versioned breaking-changes guide for upgrading to the v16 modernization release (base fold-in, native fetch, ESM, Node 22) and Protocol 27 / 28 Soroban auth (AddressV2). Modeled on viem's migration guide: one section per version, one entry per change, with before/after diffs. Sorts first in the guides nav and opens with a pointer to the home-page versioning section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: link API references in migration guide (00)

Link the first mention of each documented symbol (Keypair, the auth helpers, contract.Client/basicNodeSigner/signAuthEntries, rpc.Server/Horizon.Server, getLatestLedger, BalanceResponse, SigningCallback) to its reference page, base-agnostic, matching guide 07. Anchors verified against the rendered reference pages; internal link check passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Ryan Yang <ryan.yang@stellar.org>
Co-authored-by: Iveta <iveta@stellar.org>

* update package version to 16.0.0-rc.1

* fix: improve token formatting logic

---------

Co-authored-by: Iveta <quietbits@users.noreply.github.com>
Co-authored-by: oceans404 <so.orpilla@gmail.com>
Co-authored-by: Steph <91382964+oceans404@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Iveta <iveta@stellar.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update Docs

2 participants